#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int h = 0;
	int m = 0;
	long int k = 0;
	scanf("%d:%d %ld", &h, &m, &k);
	if (((h >= 0) && (h <= 23)) && ((m >= 0) && (m <= 59)) && (k >= 1))
	{
		int ah = 0;
		int am = 0;
		ah = k / 60;
		am = k % 60;
		if ((m + am) >= 60)
		{
			ah += ((m + am) / 60);
			am = (m + am) % 60;
		}
		else
		{
			am += m;
		}
		h = (h + ah) % 24;
		printf("%02d:%02d\n", h, am);
	}
	return 0;
}